package com.codedef.diary;

import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.util.Log;
import android.view.MenuItem;
import android.widget.TextView;
import android.widget.Toast;

import com.google.android.material.navigation.NavigationView;

public class UserInformationActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_user_information);

        Toast.makeText(this, "UserInformationActivity.onCreate()", Toast.LENGTH_SHORT).show();
        Log.i("shy", "UserInformationActivity.onCreate()");

        NavigationView navigationView =(NavigationView) findViewById(R.id.nav_view);
        navigationView.setCheckedItem(R.id.nav_user);



        TextView textView = findViewById(R.id.username);
        textView.setText("欢迎您 " + "mr");



        navigationView.setNavigationItemSelectedListener(new NavigationView.OnNavigationItemSelectedListener() {
            @Override
            public boolean onNavigationItemSelected(@NonNull MenuItem item) {
                //  mDrawerLayout.closeDrawers();
                return true;
            }
        });
    }

}